This page last changed on Jan 20, 2006 by thibaut.barrere@gmail.com.

Sometimes (eg: if you want to build a list of projects in sequence) it can be convenient to trigger builds from a NAnt script.

For that purpose one can use the launchccnetbuild NAnt task (source available here: LaunchCruiseControlBuildTask.cs).

Example:

<launchccnetbuild serverurl="tcp://buildserver:21234/CruiseManager.rem" projectname="myproject" />

The task works synchronously: it polls the server periodically to check a given project status. A build exception is raised if the build times out or is not successful (although this behavior could easily be altered).

To build a list of projects sequentially and stop the script whenever one project fails to build, you can use something like :

<target name="build.all">
   <property name="serverurl" value="tcp://buildserver:21234/CruiseManager.rem" />
   <launchccnetbuild serverurl="${serverurl}" projectname="myproject" />
   <launchccnetbuild serverurl="${serverurl}" projectname="mysecondproject" />
   <launchccnetbuild serverurl="${serverurl}" projectname="mythirdproject" />
</target>

Configuration Elements:

Attribute Description Type Required Default
serverurl The url of the remote CruiseControl.Net server hosting the project. string true N/A
projectname The name of the project to build. string true N/A
timeoutinseconds After that amount of time, a build exception will be raised. int false 1800
pollinginterval How many seconds between each project status check. int false 5

Document generated by Confluence on Mar 14, 2009 02:55